{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "ba4b73bc",
   "metadata": {},
   "source": [
    "## 本周学习内容\n",
    "### 1.课本项目直接运行\n",
    "### 2.认识变量\n",
    "### 3.赋值的概念\n",
    "### 4.python语言的基本数据结构：（文本、数值）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ca8f6022",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "28"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 回顾上周 模块 tab\n",
    "import datetime\n",
    "datetime.datetime.today().minute"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "5c22363b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This minute seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "# 1.课本项目直接运行\n",
    "# 2.先找到模块，然后从模块中调用一个方法；from模块名字 import 模块方法\n",
    "from datetime import datetime\n",
    "  \n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "            21,23,25,27,29,31,33,35,37,39,\n",
    "            41,43,45,47,49,51,53,55,57,59]    \n",
    "  \n",
    "right_this_minute = datetime.today().minute\n",
    " \n",
    "if right_this_minute in odds:\n",
    "    #if语句的子程序 会自动空tab键的间隔，如果没有空，不符合语法规则\n",
    "    #if语句的子程序不能为空，也就是至少要有一行子程序，如果还不清楚要写的子程序，可以\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "     print(\"Not an odd minute.\") "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cea74011",
   "metadata": {},
   "source": [
    "> 1.变量的定义 \n",
    ">>**变量**用于存储在计算机程序中引用和操作的信息。它们还提供一种描述性名称标记数据的方法，以便读者和我们自己能够更清楚地理解我们的序章。将变量看作包含信息的容器是有帮助的。它们唯一目的是再内存中标记和储存数据。然后可以在整个程序中使用这些数据\n",
    "\n",
    ">2.变量名称的规范  \n",
    ">> 1.变量名称只可以用数字、字母和下划线来定义名称    \n",
    "\n",
    ">> 2.数字不可以作为变量名的第一个字符（stu10001）     \n",
    "\n",
    ">> 3.内部（开发团队）已经使用过的名称不可以作为变量名，例如:  \n",
    "\n",
    ">> 4.如果你实在想定义一个已经被用过的名字:global_zhichao \\ print_zhichao\n",
    "...\n",
    "['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda','not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'with', 'yield']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "a00acebd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Jack\n"
     ]
    }
   ],
   "source": [
    "# 变量实践\n",
    "name =\"Jack\"\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8db4f98d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "luolinsheng\n"
     ]
    }
   ],
   "source": [
    "name=\"luolinsheng\"\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "67c9cbfb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Xu Zhichao\n"
     ]
    }
   ],
   "source": [
    "# 变量实践\n",
    "first_name=\"Xu\"\n",
    "last_name=\"Zhichao\"\n",
    "name=first_name+\" \"+last_name\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "94ef675f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Alex Alex\n",
      "LT,Alex Alex\n"
     ]
    }
   ],
   "source": [
    "# 变量实践\n",
    "name_01=\"Alex\"\n",
    "name_02=name_01\n",
    "\n",
    "print(name_01,name_02)\n",
    "\n",
    "name_01=\"LT,Alex\"\n",
    "\n",
    "print(name_01,name_02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "f3b310a6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "print(type(name_01))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a392b302",
   "metadata": {},
   "source": [
    "# 以上结果原因\n",
    "# python是一门解释性语言，是一行一行执行的，没有特定的要求，是不会重复运行上一行代码的"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6a8ed084",
   "metadata": {},
   "source": [
    "*1.已经完成上述的同学\n",
    "### \n",
    ">1.阅读字符\n",
    ">>1.[字符串](https://docs.python.org/3/tutorial/introduction.html#strings)   \n",
    ">>2.[字符串方法](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)      \n",
    "\n",
    ">2.阅读数值概念  \n",
    ">>1.[数值](https://docs.python.org/3/tutorial/introduction.html#numbers)   \n",
    ">>2.[数值方法](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "c6c662b7",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-26-f5165288c57b>, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-26-f5165288c57b>\"\u001b[1;36m, line \u001b[1;32m2\u001b[0m\n\u001b[1;33m    phrase='doesn't'#错误的使用\u001b[0m\n\u001b[1;37m                  ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "# invalid syntax 语法错误\n",
    "phrase='doesn't'#错误的使用\n",
    "phrase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7d3e98c7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "phrase=\"doesn't\"\n",
    "phrase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e41e63d9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'dosen'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "phrase=\"dosen\"\n",
    "phrase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "31675976",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"doesn't\" # 解决方案一\n",
    "'doesn\\'t'# 解决方案二"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "07ae53e3",
   "metadata": {},
   "outputs": [],
   "source": [
    "#字符串 三引号\"\"\" \"\"\"或者'''  '''\n",
    "#三引号  可以存储较为复杂的文本数据（例如可以存  其他语言的 数据）\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8d477ba7",
   "metadata": {},
   "source": [
    "### 字符串可以用+运算连接（粘连在一起），并用重复"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3aa7d8ba",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "luo linsheng\n"
     ]
    }
   ],
   "source": [
    "# 字符串的拼接\n",
    "print(\"luo\"+\" \"+\"linsheng\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "471bd49d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "欧东明\n"
     ]
    }
   ],
   "source": [
    "print(\"欧\"+\"东明\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26364f91",
   "metadata": {},
   "source": [
    "*字符串可以被索引（下标）\n",
    ">请大家尝试写下course_name[0] course_name[1] course_name[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "9279a923",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'interactive-media-production'"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name=\"interactive-media-production\"\n",
    "course_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "a68816f1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name.count(\"i\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "e2f92842",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'0'"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name=\"0\"\n",
    "course_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "7614e075",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'med'"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12]+course_name[13]+course_name[14]\n",
    "# 尝试取出media"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "2e14278f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12:17]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "eef501df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'cti'"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[-5:-2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "06382fcf",
   "metadata": {},
   "source": [
    "*切片（slice）的性质\n",
    ">[值1：值2]值1<值2  \n",
    ">[值1：值2]值2是取不到的  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "832b50bf",
   "metadata": {},
   "outputs": [],
   "source": [
    "后面还有，请同学们先自己"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "44f25eca",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "300"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "100+200"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "eea2f922",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "8929088"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "486523+8442565"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "1fa2b053",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "50-5*6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "2b3b299d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.0"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "8/4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "dded2cb6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.0"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(50/5)-5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "ce74384b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "print(type(2021))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "6861d55e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'float'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3.1415926))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "f8bc2d42",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "17%3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "3c0ffda0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "25"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "5**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e14176aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(5*2)-6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8c2fcbbe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6.0"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "18/3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "c2119460",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1200"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wide=20\n",
    "god=60\n",
    "wide*god"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "349ded7e",
   "metadata": {},
   "source": [
    "## 三引号练习"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "8dbd6e35",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "<div class=\"lin-header \">\n",
      "\t\t<div class=\"lin-head clearfix\">\n",
      "\t\t\t<h1 class=\"lin-topl\">\n",
      "\t\t\t\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\n",
      "\t\t\t\t\t<img src=\"images/logo.png\">\n",
      "\t\t\t\t</a>\n",
      "\t\t\t</h1>\n",
      "\t\t\t<div class=\"lin-topr\">\n",
      "\t\t\t\t<div class=\"lin-youxiang\">\n",
      "\t\t\t\t\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\n",
      "\t\t\t\t\t<a href=\"xcyx/index.htm\">校长邮箱</a>\n",
      "\t\t\t\t\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\n",
      "\t\t\t\t\t\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\n",
      "\t\t\t\t\t\t\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\n",
      "\t\t\t\t</div>\n",
      "\t\t\t\t<div class=\"lin-ser lin-serhide\">\n",
      "\t\t\t\t\t<div class=\"serbox\">\n",
      "\t\t\t\t\t\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\n",
      "\t\t\t\t\t\t\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \n",
      "\t\t\t\t\t\t\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\n",
      "\t\t\t\t\t\t\t<a href=\"javascript:;\" id=\"search_btn\">\n",
      "\t\t\t\t\t\t\t</a>\n",
      "\t\t\t\t\t\t</form>\t\n",
      "\t\t\t\t\t\t<script type=\"text/javascript\">\n",
      "\t\t\t\t\t\t\t$(\"#search_btn\").click(function(){\n",
      "\t\t\t\t\t\t\t\tvar keyword=$(\"#keyword\").val();\n",
      "\t\t\t\t\t\t\t\tif(keyword==''){\n",
      "\t\t\t\t\t\t\t\t\talert('* 请输入搜索关键词 !');\n",
      "\t\t\t\t\t\t\t\t\t$(\"#keyword\").focus();\n",
      "\t\t\t\t\t\t\t\t\treturn false;\n",
      "\t\t\t\t\t\t\t\t}else{\n",
      "\t\t\t\t\t\t\t\t\t$(\"#search_form\").submit();\n",
      "\t\t\t\t\t\t\t\t}\n",
      "\t\t\t\t\t\t\t})\n",
      "\t\t\t\t\t\t</script>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\n",
      "\t\t\t\t</div>\n",
      "\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t</div>\n",
      "    \n"
     ]
    }
   ],
   "source": [
    "广州南方学院官网_HTML =\"\"\"\n",
    "<div class=\"lin-header \">\n",
    "\t\t<div class=\"lin-head clearfix\">\n",
    "\t\t\t<h1 class=\"lin-topl\">\n",
    "\t\t\t\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\n",
    "\t\t\t\t\t<img src=\"images/logo.png\">\n",
    "\t\t\t\t</a>\n",
    "\t\t\t</h1>\n",
    "\t\t\t<div class=\"lin-topr\">\n",
    "\t\t\t\t<div class=\"lin-youxiang\">\n",
    "\t\t\t\t\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\n",
    "\t\t\t\t\t<a href=\"xcyx/index.htm\">校长邮箱</a>\n",
    "\t\t\t\t\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\n",
    "\t\t\t\t\t\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\n",
    "\t\t\t\t\t\t\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\n",
    "\t\t\t\t</div>\n",
    "\t\t\t\t<div class=\"lin-ser lin-serhide\">\n",
    "\t\t\t\t\t<div class=\"serbox\">\n",
    "\t\t\t\t\t\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\n",
    "\t\t\t\t\t\t\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \n",
    "\t\t\t\t\t\t\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\n",
    "\t\t\t\t\t\t\t<a href=\"javascript:;\" id=\"search_btn\">\n",
    "\t\t\t\t\t\t\t</a>\n",
    "\t\t\t\t\t\t</form>\t\n",
    "\t\t\t\t\t\t<script type=\"text/javascript\">\n",
    "\t\t\t\t\t\t\t$(\"#search_btn\").click(function(){\n",
    "\t\t\t\t\t\t\t\tvar keyword=$(\"#keyword\").val();\n",
    "\t\t\t\t\t\t\t\tif(keyword==''){\n",
    "\t\t\t\t\t\t\t\t\talert('* 请输入搜索关键词 !');\n",
    "\t\t\t\t\t\t\t\t\t$(\"#keyword\").focus();\n",
    "\t\t\t\t\t\t\t\t\treturn false;\n",
    "\t\t\t\t\t\t\t\t}else{\n",
    "\t\t\t\t\t\t\t\t\t$(\"#search_form\").submit();\n",
    "\t\t\t\t\t\t\t\t}\n",
    "\t\t\t\t\t\t\t})\n",
    "\t\t\t\t\t\t</script>\n",
    "\t\t\t\t\t</div>\n",
    "\t\t\t\t\t\n",
    "\t\t\t\t</div>\n",
    "\t\t\t</div>\n",
    "\t\t</div>\n",
    "\t</div>\n",
    "    \"\"\"\n",
    "print(广州南方学院官网_HTML)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7e7d2eec",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "79e879c7",
   "metadata": {},
   "source": [
    "### 数值和字符串 要分清！！！傻傻分不清"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5c75612b",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=\"50\"#双引号括起来的不是数值，哪怕他里面是数值\n",
    "b=40"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e70106d5",
   "metadata": {},
   "outputs": [],
   "source": [
    "### 课后作业\n",
    "*1.使用time模块获取当天是周几\n",
    "*2.获取到周几后，print(\"上午9：45-12：00---xxx课程，好开心啊。\")可以尝试打印好看一点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1949bc2a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "4349f681",
   "metadata": {},
   "source": [
    "# 课后作业-课程表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "69e772bf",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "16.10-17.35---大学英语,18.45-20.55---思政.一周的开始鸭\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "Monday=['1']\n",
    "Tuesday=['2']\n",
    "Wednesday=['3']\n",
    "Tursday=['4']\n",
    "Friday=['5']\n",
    "Saturday=['6']\n",
    "Sunday=['0']\n",
    "\n",
    "weekly=time.strftime(\"%w\")\n",
    "if weekly in Monday:\n",
    "    print (\"16.10-17.35---大学英语,18.45-20.55---思政.一周的开始鸭\")\n",
    "elif weekly in Tuesday:\n",
    "    print (\"9.45-12.00---中国共产党史,14.30-16.50---设计流程,18.45-20.55---旅游法语\")\n",
    "elif weekly in Wednesday:\n",
    "    print (\"8.00-9.30---体育舞蹈,12.50-15.10---创新思维，18.45-20.55---现代设计史\")\n",
    "elif weekly in Tursday:\n",
    "    print (\"08.00-10.25---交互设计,18.45-21.45---互动媒体技术\")\n",
    "elif weekly in Friday:\n",
    "    print (\"10.35-12.00---大学英语\")\n",
    "elif weekly in Saturday:\n",
    "    print (\"没有课呀，好开心\")\n",
    "elif weekly in Sunday:\n",
    "    print(\"也是没课，可以去玩啦\")\n",
    "    \n",
    "\n",
    "      \n",
    "                     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "23f55a14",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6a88d4e3",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
